package com.reremouse.rerebbs.dao.impl;

import com.reremouse.model.SystemEmailBoxModel;
import com.reremouse.rerebbs.dao.ISystemEmailBoxDAO;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import java.io.Serializable;
import java.util.List;

public class SystemEmailBoxDAO
        implements ISystemEmailBoxDAO, Serializable {
    @PersistenceContext
    private EntityManager entityManager;

    public EntityManager getEntityManager() {
        return this.entityManager;
    }

    public void setEntityManager(EntityManager entityManager) {
        this.entityManager = entityManager;
    }

    public List<SystemEmailBoxModel> findAllEmailBox() {
        String q = "Select ss from SystemEmailBoxModel ss";
        List<SystemEmailBoxModel> ais = this.entityManager.createQuery(q).getResultList();
        return ais;
    }

    public void synEmailBox(List<SystemEmailBoxModel> ss) {
        for (SystemEmailBoxModel s : ss) {
            this.entityManager.merge(s);
        }
    }
}



/* Location:           F:\jsp源码\蝙蝠论坛系统\rerebbs\WEB-INF\classes\

 * Qualified Name:     com.reremouse.rerebbs.dao.impl.SystemEmailBoxDAO

 * JD-Core Version:    0.7.0.1

 */